<template>
  <div class="about">
    <h1>搜索关键字是{{ title }}</h1>
    搜索结果是：
    <ul>
      <li v-for="(item, index) in result" :key="index">{{ item.title }}</li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      title: this.$route.query.title,
      result: [],
    };
  },
  mounted() {
    this.result = this.$store.state.list.filter((item) => {
      return item.title.includes(this.title);
    });
  },
};
</script>
